package com.duoduo.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * OrderZKController
 *
 * @author qian
 * @version 1.0
 * @date 2020/11/19 14:03
 */
@RestController
@Slf4j
public class OrderZKController {

    public static final String INVOME_URL = "http://cloud-provider-payment-zk8004";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping(value = "/consumer/payment/zk")
    public String paymentzk() {
        String response = restTemplate.getForObject(INVOME_URL + "/payment/zk", String.class);
        return response;
    }
}
